<!-- 会诊结论 -->
<template>
  <ToolbarItemContainer
    :iconFile="Icon"
    title="会诊结论"
    :needBottomPopup="true"
    :iconWidth="isUniFrameWork ? '26px' : '20px'"
    :iconHeight="isUniFrameWork ? '26px' : '20px'"
    :needDialog="false"
    @onIconClick="onIconClick"
    ref="container"
  />
</template>
<script setup lang="ts">
import { TUIStore, StoreName, IConversationModel } from '@tencentcloud/chat-uikit-engine'
import { ref } from '../../../../adapter-vue'
import ToolbarItemContainer from '../toolbar-item-container/index.vue'
import { isUniFrameWork } from '../../../../utils/is-uni'
import Icon from '../../../TUIWidget/static/icon/conclusion.png'

const currentConversation = ref<IConversationModel>()
const container = ref()

TUIStore.watch(StoreName.CONV, {
  currentConversation: (conversation: IConversationModel) => {
    currentConversation.value = conversation
  },
})

/** 点击事件 */
const onIconClick = () => {
  console.log('-- 会诊结论 ---------------->')

  uni.navigateTo({
    url: `/pages/ConsultationRoom/Prescription/Prescription`,
  })
}
</script>
<style scoped lang="scss" src="./style/index.scss"></style>
